#pragma once
#pragma execution_character_set("utf-8")

#include <QMainWindow>

#include "qtpropertymanager.h"
#include "qttreepropertybrowser.h"
#include "qtvariantproperty.h"

QT_BEGIN_NAMESPACE
namespace Ui {
class MainWindow;
}
QT_END_NAMESPACE

class MainWindow : public QMainWindow {
  Q_OBJECT
  // Q_PROPERTY(PixmapNode bitmap READ R_BITMAP WRITE S_BITMAP)
  // Q_INVOKABLE PixmapNode R_BITMAP() { if(m_bitmap){ m_send._name =
  // m_bitmap->_name; return m_send;} return PixmapNode();} Q_INVOKABLE void
  // S_BITMAP(PixmapNode& name){ this->setBitmap(name._name); }

 public:
  MainWindow(QWidget *parent = nullptr);
  ~MainWindow();

 private:
  Ui::MainWindow *ui;

 private:
  QtVariantPropertyManager *_variantPropertyManager = nullptr;
  QtTreePropertyBrowser *_treePropertyBrowser = nullptr;

 private:
  void addProperty();
  void addProperty2();
  void testAsync();
};
